//
//  ViewController.m
//  simulatorLocation
//
//  Created by zhang on 2017/4/14.
//  Copyright © 2017年 zhang. All rights reserved.
//

#import "ViewController.h"
#import "MSManageLocation.h"
#import <CoreNFC/CoreNFC.h>
#import <CoreNFC/NFCError.h>

@interface ViewController ()<NFCNDEFReaderSessionDelegate>
{
    NFCNDEFReaderSession *ssss;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    ssss=[[NFCNDEFReaderSession alloc]initWithDelegate:self queue:dispatch_queue_create(NULL, DISPATCH_QUEUE_CONCURRENT) invalidateAfterFirstRead:YES];
//    [ssss beginSession];


    
    // Do any additional setup after loading the view, typically from a nib.
   // 117.31189,40.038887
//    31.2949499676,121.5091018238

//121.56162,31.248081
    
    
  CLLocationCoordinate2D  location1 = [MSManageLocation bd09ToWgs84:CLLocationCoordinate2DMake(31.248703,121.561154)];
//
//  CLLocationCoordinate2D  location2 = [MSManageLocation gcj02ToWgs84:location1];
    NSLog(@"lat = %f  \nlon = %f" ,location1.latitude,location1.longitude);
//
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [ssss beginSession];
}

-(void)readerSession:(NFCNDEFReaderSession *)session didDetectTags:(nonnull NSArray<__kindof id<NFCTag>> *)tags
{
    NSLog(@"");
}

//扫描到的回调
-(void)readerSession:(NFCNDEFReaderSession *)session didDetectNDEFs:(nonnull NSArray<NFCNDEFMessage *> *)messages
{
    NSLog(@"");
}

//错误回调
-(void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NSError *)error{
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
